function style = pstyles(n,param)
%creates plotstyles based on given params
%in = (n,param) n is the n'th plot style
% param = 'NL' if no line is desired, styles with lines will
% default, = 'LO' will result in a style where each data point is not
% defined by a mark, 'LM' will result in the default, which is a line
% with marks at each data point

colors = {'b','g','r','c','m','y','k'};
lc = length(colors);

marks = {'.','o','x','+','*','s','d','v','^','<','>','p','h'};
lm = length(marks);

lines = {'-',':','-.','--'};
ll = length(lines);

cuse = colors{mod(n,lc)+~mod(n,lc)*lc};
muse = marks{mod(n,lm)+~mod(n,lm)*lm};
% mod(n,ll)
luse = lines{mod(n,ll)+~mod(n,ll)*ll};

if (nargin == 1) || all(param == 'LM')
    
    luse = '-';
    style = [cuse,muse,luse];
elseif all(param == 'NL')
    style = [cuse,muse];
elseif all(param == 'LO')
%     style = [cuse,luse];
    style = cuse;
else
    error('Please specify a valid parameter');
    return;
end